package com.site.common.interceptor;

import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.method.HandlerMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author xiaochi
 * @date 2022/4/30 18:02
 * @desc AbstractBaseInterceptor
 */
public abstract class AbstractBaseInterceptor implements BaseInterceptor{

    /**
     * 执行
     * @param request
     * @param response
     * @param method
     * @return
     */
    public boolean doHandler(HttpServletRequest request, HttpServletResponse response, HandlerMethod method){
        return this.execute(request,response,method);
    }

    /**
     * 具体实现
     * @param request
     * @param response
     * @param method
     * @return
     */
    protected abstract boolean execute(HttpServletRequest request, HttpServletResponse response, HandlerMethod method);
}
